package com.linkpow.smartelevator.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @ClassName MyBatisPlusConfig
 * @Description MyBatisPlus配置
 * https://mybatis.plus/guide/
 * https://gitee.com/baomidou/mybatis-plus-samples
 * @Author 王丹
 * @Date 2019/11/25 19:54
 * @Version 1.0
 */
@EnableTransactionManagement
@Configuration
@MapperScan("com.linkpow.smartelevator.mapper*")
public class MyBatisPlusConfig {

    // mybatis-plus分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor page = new PaginationInterceptor();
        page.setDialectType("mysql");
        return page;
    }

}
